<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>编辑菜单</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/bootstrap-4.6.2-dist/css/bootstrap.css">
</head>
<body style="padding: 20px">

<h2>编辑菜单</h2>

<form action="${pageContext.request.contextPath}/menu/update" method="post">

    <input type="hidden" name="id" value="${menu.id}">

    <div class="form-group">
        <label for="name">菜单名称：</label>
        <input type="text" class="form-control" id="name" name="name" value="${menu.name}" required>
    </div>

    <div class="form-group">
        <label for="url">菜单链接：</label>
        <input type="text" class="form-control" id="url" name="url" value="${menu.url}" required>
    </div>

    <button type="submit" class="btn btn-primary">提交</button>
    <a href="${pageContext.request.contextPath}/menu/list" class="btn btn-secondary">返回</a>
</form>

</body>
</html>
